<?
global $db,$topdir;
$e = inc_incfile("wiki/global.php",$params);
$link = $e["link"];

$eold = $db->query1("select * from wiki where id = ".$db->sqlint($_REQUEST["oldid"]));
$enew = $db->query1("select * from wiki where id = ".$db->sqlint($_REQUEST["newid"]));

require_once "$topdir/ext/DifferenceEngine.php";

skin_param("title","Diff");

$diff = new Diff(explode("\n",htmlentities($eold["content"])),
	explode("\n",htmlentities($enew["content"])));
	
$tdiff = new TableDiffFormatter();

echo "<table>";
echo "<tr><th colspan=2>{$eold["datetimeon"]}<th colspan=2>{$enew["datetimeon"]}";
echo $tdiff->format($diff);
echo "</table>";



